﻿using Enterprises.Wpf.Core.Enums;
using Enterprises.Wpf.Core.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Enterprises.Wpf.Core.Common
{
    /// <summary>
    /// 常规的字节转换类<br />
    /// Regular byte conversion class
    /// </summary>
    public class RegularByteTransform : ByteTransformBase
    {
        /// <inheritdoc cref="M:HslCommunication.Core.ByteTransformBase.#ctor" />
        public RegularByteTransform()
        {
        }

        /// <inheritdoc cref="M:HslCommunication.Core.ByteTransformBase.#ctor(HslCommunication.Core.DataFormat)" />
        public RegularByteTransform(DataFormat dataFormat)
            : base(dataFormat)
        {
        }

        /// <inheritdoc cref="M:HslCommunication.Core.IByteTransform.CreateByDateFormat(HslCommunication.Core.DataFormat)" />
        public override IByteTransform CreateByDateFormat(DataFormat dataFormat)
        {
            return new RegularByteTransform(dataFormat)
            {
                IsStringReverseByteWord = IsStringReverseByteWord
            };
        }

        /// <inheritdoc />
        public override string ToString()
        {
            return $"RegularByteTransform[{DataFormat}]";
        }
    }

}
